/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.googlecode.hfdpexample;

import com.googlecode.hfdpexample.behavior.FlyBehavior;
import com.googlecode.hfdpexample.behavior.QuackBehavior;

/**
 *
 * @author samwang
 */
public class Duck {

    FlyBehavior flyBehavior;
    QuackBehavior quackBehavior;

    void performQuack() {
        quackBehavior.quack();
    }

    void preformFly() {
        flyBehavior.fly();
    }

    void quack() {
    }

    void swim() {
    }

    void display() {
    }

    void fly() {
    }

    public void setFlyBehavior(FlyBehavior flyBehavior) {
        this.flyBehavior = flyBehavior;
    }

    public void setQuackBehavior(QuackBehavior quackBehavior) {
        this.quackBehavior = quackBehavior;
    }
    
}
